package com.edgar.oom;

/**
 * -verbose:gc -Xms20M -Xmx20M -Xmn10M -XX:SurvivorRatio=8 -XX:+PrintGCDetails
 * -XX:PretenureSizeThreshold=3145728 -XX:MaxTenuringThreshold=1
 * 
 * @author 张雨舟
 * 
 */
public class MaxTenuringGC {

	private static final int _1MB = 1024 * 1024;

	public static void testAllocation() {
		byte[] allocation1 = new byte[_1MB / 4];
		byte[] allocation2 = new byte[4 * _1MB];
		byte[] allocation3 = new byte[4 * _1MB];
		allocation3 = null;
		allocation3 = new byte[4 * _1MB];
	}

	public static void main(String[] args) {
		testAllocation();
	}

}
